package com.example.qy.mapper;

import com.example.qy.pojo.sf;
import com.example.qy.pojo.wyf;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SfMapper {
    @Select("select s.ysf,s.ssf,s.fj,s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username}")
    public List<sf> select(String username);
    @Select("select * from sf")
    public List<sf> selectall();
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('1'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add1(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('2'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add2(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('3'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add3(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('4'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add4(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('5'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add5(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('6'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add6(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('7'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add7(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('8'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add8(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('9'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add9(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('10'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add10(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('11'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add11(sf sf);
    @Insert("insert into sf (ysf,ssf,fj,sfl,time,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('12'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add12(sf sf);
    @Delete("delete from sf where uid=#{uid}")
    public void delete(int uid);

}
